{ ***  cef_web_plugin_capi.h  *** }

  PCefWebPluginInfo = ^TCefWebPluginInfo;
  PCefWebPluginInfoVisitor = ^TCefWebPluginInfoVisitor;
  PCefWebPluginUnstableCallback = ^TCefWebPluginUnstableCallback;

  // Information about a specific web plugin.
  TCefWebPluginInfo = record
    // Base structure.
    base: TCefBase;

    // Returns the plugin name (i.e. Flash).
    //
    // The resulting string must be freed by calling cef_string_userfree_free().
    get_name: function(self: PCefWebPluginInfo): PCefStringUserFree; cconv;

    // Returns the plugin file path (DLL/bundle/library).
    //
    // The resulting string must be freed by calling cef_string_userfree_free().
    get_path: function(self: PCefWebPluginInfo): PCefStringUserFree; cconv;

    // Returns the version of the plugin (may be OS-specific).
    //
    // The resulting string must be freed by calling cef_string_userfree_free().
    get_version: function(self: PCefWebPluginInfo): PCefStringUserFree; cconv;

    // Returns a description of the plugin from the version information.
    //
    // The resulting string must be freed by calling cef_string_userfree_free().
    get_description: function(self: PCefWebPluginInfo): PCefStringUserFree; cconv;
  end;


  // Structure to implement for visiting web plugin information. The functions of
  // this structure will be called on the browser process UI thread.
  TCefWebPluginInfoVisitor = record
    // Base structure.
    base: TCefBase;

    // Method that will be called once for each plugin. |count| is the 0-based
    // index for the current plugin. |total| is the total number of plugins.
    // Return false (0) to stop visiting plugins. This function may never be
    // called if no plugins are found.
    visit: function(self: PCefWebPluginInfoVisitor;
      info: PCefWebPluginInfo; count, total: Integer): Integer; cconv;
  end;


  // Structure to implement for receiving unstable plugin information. The
  // functions of this structure will be called on the browser process IO thread.
  TCefWebPluginUnstableCallback = record
    // Base structure.
    base: TCefBase;

    // Method that will be called for the requested plugin. |unstable| will be
    // true (1) if the plugin has reached the crash count threshold of 3 times in
    // 120 seconds.
    is_unstable: procedure(self: PCefWebPluginUnstableCallback;
        const path: PCefString; unstable: Integer); cconv;
  end;

    // Visit web plugin information. Can be called on any thread in the browser
    // process.
    tfn_cef_visit_web_plugin_info = procedure(
        visitor: PCefWebPluginInfoVisitor); cdecl;

    // Cause the plugin list to refresh the next time it is accessed regardless of
    // whether it has already been loaded. Can be called on any thread in the
    // browser process.
    tfn_cef_refresh_web_plugins = procedure; cdecl;

    // Add a plugin path (directory + file). This change may not take affect until
    // after cef_refresh_web_plugins() is called. Can be called on any thread in the
    // browser process.
    tfn_cef_add_web_plugin_path = procedure(
        const path: PCefString); cdecl;

    // Add a plugin directory. This change may not take affect until after
    // cef_refresh_web_plugins() is called. Can be called on any thread in the
    // browser process.
    tfn_cef_add_web_plugin_directory = procedure(
        const dir: PCefString); cdecl;


    // Remove a plugin path (directory + file). This change may not take affect
    // until after cef_refresh_web_plugins() is called. Can be called on any thread
    // in the browser process.
    tfn_cef_remove_web_plugin_path = procedure(
        const path: PCefString); cdecl;

    // Unregister an internal plugin. This may be undone the next time
    // cef_refresh_web_plugins() is called. Can be called on any thread in the
    // browser process.
    tfn_cef_unregister_internal_web_plugin = procedure(
        const path: PCefString); cdecl;

    // Force a plugin to shutdown. Can be called on any thread in the browser
    // process but will be executed on the IO thread.
    tfn_cef_force_web_plugin_shutdown = procedure(
        const path: PCefString); cdecl;

    // Register a plugin crash. Can be called on any thread in the browser process
    // but will be executed on the IO thread.
    tfn_cef_register_web_plugin_crash = procedure(
        const path: PCefString); cdecl;

    // Query if a plugin is unstable. Can be called on any thread in the browser
    // process.
    tfn_cef_is_web_plugin_unstable = procedure(
        const path: PCefString;
        callback: PCefWebPluginUnstableCallback); cdecl;

